package com.example.demo.controller;

//import com.example.demo.entity.Classinfo;
//import com.example.demo.service.ClassinfoService;
import org.apache.ibatis.annotations.Delete;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("cl")
public class ClassinfoRestController {

//    @Autowired
//    private ClassinfoService classinfoService;
//
////http:localhost:8080/cl/cla   get
//    @GetMapping("cla")
//    public List<Classinfo> getAllClassinfo() {
//        return classinfoService.queryAllClassinfo();
//    }
//    //http:localhost:8080/cl/cla/16   get
//    @GetMapping("cla/{id}")
//    public Classinfo QueryBYid(@PathVariable("id") Integer clsid) {
//        return classinfoService.queryClassinfoByID(clsid);
//    }
//    //http:localhost:8080/cl/cla   put
//    @PutMapping("cla")
//    public Integer updateClassinfo( Classinfo classinfo) {
//
//        return classinfoService.updateClassinfo(classinfo);
//    }
//    //http:localhost:8080/cl/cla/12   delete
//    @Delete("cla/{id}")
//    public Integer delClassinfo(@PathVariable Integer clsid) {
//        return classinfoService.deleteClassinfo(clsid);
//    }
//    //http:localhost:8080/cl/cla   post
//    @PostMapping("cla")
//    public Integer insertClassinfo(Classinfo classinfo) {
//        return classinfoService.insertClassinfo(classinfo);
//    }
//
////    @GetMapping("all")
////    public List<Classinfo> getAllClassinfo() {
////        return classinfoService.queryAllClassinfo();
////    }
////
////    @GetMapping("query/{id}")
////    public Classinfo QueryBYid(@PathVariable("id") Integer clsid) {
////        return classinfoService.queryClassinfoByID(clsid);
////    }
////    @PutMapping("update")
////
////    public Integer updateClassinfo( Classinfo classinfo) {
////
////        return classinfoService.updateClassinfo(classinfo);
////    }
////
////    @Delete("del/{id}")
////    public Integer delClassinfo(@PathVariable Integer clsid) {
////        return classinfoService.deleteClassinfo(clsid);
////    }
////
////    @PostMapping("add")
////    public Integer insertClassinfo(Classinfo classinfo) {
////        return classinfoService.insertClassinfo(classinfo);
////    }
}
